package com.yin.myproject.thread.threadlocaldemo;

import java.util.concurrent.TimeUnit;

/**
 * @author Eason
 * @create 2018-02-27 15:41
 **/
public class SafeCore {
    public static void main(String[] args) {
        SafeTask task = new SafeTask();
        for (int i = 0; i < 5; i++) {
            Thread thread = new Thread(task);
            thread.start();
            try {
                TimeUnit.SECONDS.sleep((int) Math.rint(Math.random() * 10));
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
